section    .data
quan EQU 4
section    .text
global   main
 getchar: 
 PUSH ebp
 MOV ebp,esp
 SUB esp,1
 mov eax, 3 
 mov ebx, 0 
 mov ecx, ebp 
 sub ecx, 1 
 mov edx, 1 
 int 80h 
 MOV AL,byte [-1+ebp]
 leave 
 RET 
 putchar: 
 PUSH ebp
 MOV ebp,esp
 SUB esp,1
 mov eax, 4 
 mov ebx, 1 
 mov ecx, ebp 
 add ecx, 8 
 mov edx, 1 
 int 80h 
 mov byte [ebp+8],al 
 MOV AL,byte [8+ebp]
 leave 
 RET 
 char_to_int: 
 PUSH ebp
 MOV ebp,esp
 SUB esp,5
 mov eax,0 
 mov al,byte [ebp+8] 
 mov dword [ebp-4],eax 
 MOV EAX,dword [-4+ebp]
 leave 
 RET 
 int_to_char: 
 PUSH ebp
 MOV ebp,esp
 SUB esp,5
 mov eax,dword [ebp+8] 
 mov byte [ebp-1],al 
 MOV AL,byte [-1+ebp]
 leave 
 RET 
 get_int: 
 PUSH ebp
 MOV ebp,esp
 SUB esp,27
 MOV EAX,0
 MOV dword [-27+ebp],EAX
 MOV dword [-27+ebp],EAX
 MOV EAX,0
 MOV dword [-18+ebp],EAX
 lb0 :
 MOV dword [-18+ebp],EAX
 CMP EAX,8
 JL mylb1
 MOV AL,0
 JMP mylb2
 mylb1 :
 MOV AL,1
 mylb2 :
 MOV byte [-14+ebp],AL
 MOV byte [-14+ebp],AL
 MOV AL,byte [-14+ebp]
 AND AL,AL
 JZ lb1
 JMP lb2
 lb3 :
 MOV EAX,dword [-18+ebp]
 MOV dword [-13+ebp],EAX
 MOV dword [-13+ebp],EAX
 MOV EAX,dword [-18+ebp]
 INC EAX
 MOV dword [-18+ebp],EAX
 JMP lb0
 lb2 :
 CALL getchar
 MOV byte [-9+ebp],AL
 MOV AL,byte [-9+ebp]
 MOV byte [-23+ebp],AL
 MOV byte [-23+ebp],AL
 CMP AL,48
 JL mylb3
 MOV AL,0
 JMP mylb4
 mylb3 :
 MOV AL,1
 mylb4 :
 MOV byte [-8+ebp],AL
 MOV byte [-8+ebp],AL
 MOV AL,byte [-23+ebp]
 CMP AL,57
 JG mylb5
 MOV AL,0
 JMP mylb6
 mylb5 :
 MOV AL,1
 mylb6 :
 MOV byte [-7+ebp],AL
 MOV byte [-7+ebp],AL
 OR AL,byte [-8+ebp]
 MOV byte [-6+ebp],AL
 MOV AL,byte [-6+ebp]
 AND AL,AL
 JZ lb4
 MOV EAX,dword [-27+ebp]
 leave 
 RET 
 lb4 :
 MOV AL,byte [-23+ebp]
 SUB AL,48
 MOV byte [-23+ebp],AL
 MOV AL,byte [-23+ebp]
 SUB esp,1
 MOV [esp],AL
 CALL char_to_int
 MOV dword [-5+ebp],EAX
 MOV EAX,dword [-5+ebp]
 MOV dword [-22+ebp],EAX
 MOV dword [-22+ebp],EAX
 MOV EAX,dword [-27+ebp]
 MOV ecx,10
 MUL ecx
 MOV dword [-27+ebp],EAX
 ADD EAX,dword [-22+ebp]
 MOV dword [-27+ebp],EAX
 JMP lb3
 lb1 :
 CALL getchar
 MOV byte [-1+ebp],AL
 MOV EAX,dword [-27+ebp]
 leave 
 RET 
 put_int: 
 PUSH ebp
 MOV ebp,esp
 SUB esp,33
 MOV EAX,1
 MOV dword [-25+ebp],EAX
 MOV dword [-25+ebp],EAX
 MOV EAX,0
 MOV dword [-29+ebp],EAX
 lb5 :
 MOV dword [-29+ebp],EAX
 MOV EAX,dword [-25+ebp]
 CMP EAX,dword [8+ebp]
 JLE mylb7
 MOV AL,0
 JMP mylb8
 mylb7 :
 MOV AL,1
 mylb8 :
 MOV byte [-20+ebp],AL
 MOV byte [-20+ebp],AL
 MOV AL,byte [-20+ebp]
 AND AL,AL
 JZ lb6
 JMP lb7
 lb8 :
 MOV EAX,dword [-29+ebp]
 MOV dword [-19+ebp],EAX
 MOV dword [-19+ebp],EAX
 MOV EAX,dword [-29+ebp]
 INC EAX
 MOV dword [-29+ebp],EAX
 JMP lb5
 lb7 :
 MOV EAX,dword [-25+ebp]
 MOV ecx,10
 MUL ecx
 MOV dword [-25+ebp],EAX
 JMP lb8
 lb6 :
 lb9 :
 lb12 :
 MOV EAX,dword [-29+ebp]
 MOV dword [-15+ebp],EAX
 MOV dword [-15+ebp],EAX
 MOV EAX,dword [-29+ebp]
 DEC EAX
 MOV dword [-29+ebp],EAX
 MOV EAX,dword [-15+ebp]
 AND EAX,EAX
 JZ lb10
 MOV edx,0
 MOV EAX,dword [-25+ebp]
 MOV ecx,10
 DIV ecx
 MOV edx,0
 MOV dword [-25+ebp],EAX
 MOV EAX,dword [8+ebp]
 MOV ecx,dword [-25+ebp]
 DIV ecx
 MOV edx,0
 MOV dword [-11+ebp],EAX
 MOV ecx,10
 DIV ecx
 MOV dword [-7+ebp],EDX
 MOV EAX,dword [-7+ebp]
 SUB esp,4
 MOV [esp],EAX
 CALL int_to_char
 MOV byte [-3+ebp],AL
 MOV AL,byte [-3+ebp]
 ADD AL,48
 MOV byte [-2+ebp],AL
 MOV byte [-21+ebp],AL
 MOV byte [-21+ebp],AL
 MOV AL,byte [-21+ebp]
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-1+ebp],AL
 JMP lb9
 lb10 :
 MOV EAX,1
 leave 
 RET 
 ad: 
 PUSH ebp
 MOV ebp,esp
 SUB esp,12
 MOV EAX,dword [12+ebp]
 ADD EAX,dword [8+ebp]
 MOV dword [-4+ebp],EAX
 MOV EAX,dword [-4+ebp]
 leave 
 RET 
 main: 
 PUSH ebp
 MOV ebp,esp
 SUB esp,84
 MOV AL,97
 MOV byte [7+ebp],AL
 MOV byte [7+ebp],AL
 MOV AL,100
 MOV byte [7+ebp],AL
 MOV byte [7+ebp],AL
 MOV AL,100
 MOV byte [7+ebp],AL
 MOV byte [7+ebp],AL
 MOV AL,58
 MOV byte [7+ebp],AL
 MOV byte [7+ebp],AL
 MOV AL,10
 MOV byte [7+ebp],AL
 MOV byte [7+ebp],AL
 MOV AL,0
 MOV byte [7+ebp],AL
 MOV byte [7+ebp],AL
 MOV AL,97
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-51+ebp],AL
 MOV AL,100
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-50+ebp],AL
 MOV AL,100
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-49+ebp],AL
 MOV AL,58
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-48+ebp],AL
 MOV AL,10
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-47+ebp],AL
 MOV AL,110
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-46+ebp],AL
 MOV AL,117
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-45+ebp],AL
 MOV AL,109
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-44+ebp],AL
 MOV AL,49
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-43+ebp],AL
 MOV AL,58
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-42+ebp],AL
 CALL get_int
 MOV dword [-41+ebp],EAX
 MOV EAX,dword [-41+ebp]
 MOV dword [-64+ebp],EAX
 MOV dword [-64+ebp],EAX
 MOV AL,110
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-37+ebp],AL
 MOV AL,117
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-36+ebp],AL
 MOV AL,109
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-35+ebp],AL
 MOV AL,50
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-34+ebp],AL
 MOV AL,58
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-33+ebp],AL
 CALL get_int
 MOV dword [-32+ebp],EAX
 MOV EAX,dword [-32+ebp]
 MOV dword [-60+ebp],EAX
 MOV dword [-60+ebp],EAX
 MOV EAX,dword [-64+ebp]
 SUB esp,4
 MOV [esp],EAX
 MOV EAX,dword [-60+ebp]
 SUB esp,4
 MOV [esp],EAX
 CALL ad
 MOV dword [-28+ebp],EAX
 MOV EAX,dword [-28+ebp]
 MOV dword [-56+ebp],EAX
 MOV dword [-56+ebp],EAX
 MOV AL,67
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-24+ebp],AL
 MOV AL,97
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-23+ebp],AL
 MOV AL,108
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-22+ebp],AL
 MOV AL,99
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-21+ebp],AL
 MOV AL,117
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-20+ebp],AL
 MOV AL,108
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-19+ebp],AL
 MOV AL,97
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-18+ebp],AL
 MOV AL,116
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-17+ebp],AL
 MOV AL,111
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-16+ebp],AL
 MOV AL,110
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-15+ebp],AL
 MOV AL,32
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-14+ebp],AL
 MOV AL,114
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-13+ebp],AL
 MOV AL,101
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-12+ebp],AL
 MOV AL,115
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-11+ebp],AL
 MOV AL,117
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-10+ebp],AL
 MOV AL,108
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-9+ebp],AL
 MOV AL,116
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-8+ebp],AL
 MOV AL,115
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-7+ebp],AL
 MOV AL,58
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-6+ebp],AL
 MOV EAX,dword [-56+ebp]
 SUB esp,4
 MOV [esp],EAX
 CALL put_int
 MOV dword [-5+ebp],EAX
 MOV AL,10
 SUB esp,1
 MOV [esp],AL
 CALL putchar
 MOV byte [-1+ebp],AL
 leave 
 MOV eax,1
 MOV ebx,0
 int 80h
